package Threadtest;

public class test5_lock {
    public static void main(String[] args) {
        //加锁
        for (int i = 0; i < 3; i++) {
            Thread t=new Thread(new task3());
            t.setName("窗口"+(i+1));
            t.start();
        }
//        没加锁
//        for (int i = 0; i < 3; i++) {
//            Thread t=new Thread(new task1());
//            t.setName("窗口"+(i+1));
//            t.start();
//        }
//
    }
}
